/**
 * 
 */
package com.HibernateRecepies.DAO4_3;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

import com.Hib.Util.SessionManager;
import com.HibernateRecepies.Domain4_3.Video;

/**
 * @author Ignatiues charles arun
 * 
 *         Dec 11, 2010
 */
public class DiscDAO
	{

		private static SessionFactory sessionFactory;

		private static Session session;

		/**
		 * @param args
		 */
		public static void main(String[] args)
			{
				// TODO Auto-generated method stub
				sessionFactory = SessionManager.getSessionfactory();
				session = sessionFactory.getCurrentSession();
				Transaction tx = session.beginTransaction();
				Video vdDsc = new Video();
				vdDsc.setId(new Long(201010));
				vdDsc.setDiscName("OSCAR FILMS");
				vdDsc.setPrice(new Long(342));
				vdDsc.setDirector("James Cameroon");
				vdDsc.setLanguage("English");

				session.save(vdDsc);
				tx.commit();

			}
	}
